/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本布局 */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 主要内容样式 */
.main-content {
    flex-grow: 1;
    padding: 20px 0;
}

.playlist-header, .singer-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.playlist-image, .singer-image {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    margin-right: 20px;
}

.playlist-details, .singer-details {
    flex-grow: 1;
}

.playlist-bio, .singer-bio {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}

/* 导航栏样式 */
.navbar {
    background-color: #333;
    color: #fff;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo a {
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar nav ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
}

.navbar nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
}

.navbar .search-bar {
    margin-left: auto;
}

.navbar .search-bar input {
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
}

.navbar .search-bar button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background-color: #ff6b6b;
    color: #fff;
    cursor: pointer;
}

/* 推荐部分样式 */
.recommend {
    margin: 2rem 0;
}

.recommend h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.recommend-categories {
    text-align: center;
    margin-bottom: 1rem;
}

.recommend-categories .category {
    margin: 0 10px;
    cursor: pointer;
}

.recommend-categories .category.active {
    font-weight: bold;
    color: #ff6b6b;
}

.recommend-list-container {
    position: relative;
}

.nav-btn {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    font-size: 24px;
}

#prevBtn {
    left: 0;
}

#nextBtn {
    right: 0;
}

.recommend-list {
    display: flex;
    gap: 1rem;
    overflow: hidden;
    scroll-behavior: smooth;
    padding: 10px 0;
    flex-wrap: nowrap;
    transition: transform 0.3s ease-in-out;
}

.recommend-item {
    text-align: center;
    flex-shrink: 0;
    width: calc(25% - 1rem); /* 每行四个 */
    transition: transform 0.3s ease-in-out;
}

.recommend-item img {
    width: 80%;
    border-radius: 10px;
    object-fit: cover;
}

.recommend-item p {
    margin-top: 0.5rem;
}

.recommend-item:hover {
    transform: scale(1.05);
}

/* 筛选栏样式 */
.filter-bar {
    margin: 2rem 0;
}

.filter-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-title {
    background-color: #27ae60;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin-right: 1rem;
}

.filter-group a {
    color: #333;
    text-decoration: none;
    margin-right: 1rem;
}

.filter-group a.filter-link.active {
    font-weight: bold;
    color: #27ae60;
}

/* 歌手排行部分样式 */
.singer-rankings {
    margin: 2rem 0;
}

.singer-rankings h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.mod_singer_list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.singer-item {
    text-align: center;
    flex: 1 1 calc(20% - 1rem); /* 五个一行 */
}

.singer-item img {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    object-fit: cover;
}

.singer-item p {
    margin-top: 0.5rem;
}

.singer_list_text {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    gap: 1rem;
}

.singer_list_txt_item {
    flex: 1 1 calc(20% - 1rem); /* 五个一行 */
    text-align: center;
}

.singer_list_txt_link {
    color: #333;
    text-decoration: none;
}

/* 歌手详情部分样式 */
.singer-info {
    display: flex;
    align-items: center;
    margin: 2rem 0;
}

.singer-header {
    display: flex;
    align-items: center;
}

.singer-image {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    margin-right: 1rem;
    object-fit: cover;
}

.singer-details {
    max-width: 600px;
}

.singer-details h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.singer-bio {
    font-size: 1rem;
    color: #555;
}

.more-btn {
    color: #27ae60;
    cursor: pointer;
}

/* 热门歌曲部分样式 */
.singer-songs {
    margin: 2rem 0;
}

.singer-songs h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.songlist__header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
    text-align: center;
}

.songlist__header li {
    font-weight: bold;
    color: #333;
}

.songlist_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.song-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    justify-items: center;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
}

.songlist_songname,
.songlist_album,
.songlist_time {
    text-align: left;
}

.songlist_time {
    text-align: right;
}

.song-album-cover {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    margin-right: 1rem;
}

.play-button {
    display: none;
    position: absolute;
    right: 10px;
    padding: 0.5rem 1rem;
    border: none;
    background-color: #27ae60;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.song-item:hover .play-button {
    display: block;
}

.song-item:hover {
    transform: translateY(-2px);
    background-color: #f9f9f9;
    transition: transform 0.3s, background-color 0.3s;
}

/* 专辑部分样式 */
.singer-albums {
    margin: 2rem 0;
}

.singer-albums h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.album-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.album-item {
    flex: 1 1 calc(20% - 1rem); /* 五个一行 */
    text-align: center;
}

.album-item img {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    object-fit: cover;
}

.album-item p {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #333;
}

.album-item:hover {
    transform: translateY(-2px);
    background-color: #f9f9f9;
    transition: transform 0.3s, background-color 0.3s;
}

/* MV部分样式 */
.singer-mvs {
    margin: 2rem 0;
}

.singer-mvs h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.mv-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.mv-item {
    flex: 1 1 calc(20% - 1rem); /* 五个一行 */
    text-align: center;
}

.mv-item img {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    object-fit: cover;
}

.mv-item p {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #333;
}

.mv-item:hover {
    transform: translateY(-2px);
    background-color: #f9f9f9;
    transition: transform 0.3s, background-color 0.3s;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8); /* Increased opacity for better focus */
}

.modal-content {
    background-color: #fff;
    margin: 2.5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%; /* Increased width */
    height: 90%; /* Increased height */
    max-width: 1600px; /* Adjusted max width */
    border-radius: 10px;
    text-align: center;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* 按钮样式 */
.singer-extra-buttons {
    margin: 1rem 0;
    display: flex;
    gap: 1rem;
}

.singer-extra-buttons button {
    padding: 0.5rem 1rem;
    cursor: pointer;
    background-color: #f0f0f0;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
}

.singer-extra-buttons button:hover {
    background-color: #27ae60;
    color: #fff;
    transform: translateY(-2px);
}

/* 列表项过渡效果 */
.song-item:hover, .album-item:hover, .mv-item:hover {
    transform: translateY(-2px);
    background-color: #f9f9f9;
    transition: transform 0.3s, background-color 0.3s;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* 音乐播放器样式 */
#music-player {
    display: none; /* 初始状态隐藏 */
    width: 100%;
    height: 100px;
    background-color: #f3f3f3;
    position: fixed;
    bottom: 0;
    left: 0;
    border-top: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    opacity: 0; /* 初始透明度 */
    transition: opacity 0.5s ease-in-out; /* 渐变显示效果 */
}

.album-cover {
    width: 60px;
    height: 60px;
    border-radius: 5px;
}

.song-info {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
    flex-grow: 1;
}

#song-name, #singer-name {
    font-size: 14px;
    margin: 2px 0;
}

.controls {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.control-button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin: 0 10px;
    color: #333;
}

.time-container {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

#progress-bar {
    width: 80%;
    margin: 0 10px;
}

#current-lyric {
    position: absolute; /* 固定在播放器区域内 */
    bottom: 70px; /* 固定在进度条上方 */
    width: 100%;
    text-align: center;
    font-size: 14px;
    color: #333;
    transition: opacity 0.5s;
}

.control-button:focus {
    outline: none;
}

.time, .volume, .play-mode, .lyrics {
    margin-left: 20px;
    font-size: 14px;
    color: #333;
}

.progress {
    flex-grow: 1;
    margin: 0 20px;
}

#progress-bar {
    width: 100%;
}

#current-time, #total-time {
    font-size: 14px;
}

.volume input[type="range"] {
    vertical-align: middle;
}

#play-mode {
    cursor: pointer;
}

#lyrics-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

#lyrics-modal {
    display: none;
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -20%);
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

#close-lyrics {
    cursor: pointer;
    font-size: 14px;
    color: #333;
    text-align: right;
}

#lyrics-content {
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.5;
}
